package org.shangma.feign;

import org.shangma.common.Good;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("seata-xa-good")
@RequestMapping("good")
public interface GoodFeignClient {

    @GetMapping("{id}")
    public Good findById(@PathVariable("id") int id);

    @PutMapping()
    public void reduceStock(@RequestParam("goodId") int goodId, @RequestParam("stockNum") int stockNum);

}